<?php
    $cur = date('Y-m-d H:i:s');
    echo $cur;
    
    $t = date_sub($cur, INTERVAL 1 DAY);
?>